<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Title</title>

    <script>
      'use strict'; //必须在第一行

      // 单行字符
      console.log('a');
      console.log('a');
      console.log("a'\nb");
      console.log('\u4e2d'); // \u####   unicode字符  中
      console.log('\x41'); // \x##   AscII字符  A

      // tab上边, esc下边,1右边 , 符号键
      //多行字符
      let muts = `1
2
        中国
        A
        b
        `;
      console.log(muts);

      //模版字符(支持多行)
      let name = 'tom';
      let age = 12;
      let s = `hello, ${name}-
        ${age}, end`;
      console.log(s);

      let s1 = 'student';
      console.log(s1.toUpperCase());
      console.log(s1.toLowerCase());
      console.log(s1.charAt(1)); //t
      console.log(s1.indexOf('t')); //1
      console.log(s1.indexOf('t', 5)); //6
      console.log(s1.indexOf('t', 7)); //-1

      console.log(s1.substring(1)); // tudent
      console.log(s1.substring(1, 3)); // tu  [1,3)
    </script>
  </head>
  <body>
    Lorem ipsum dolor. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci error id
    minus necessitatibus perspiciatis ratione recusandae vel voluptatem? At error illo illum iusto
    libero modi quibusdam quod sit vel voluptas?
    <div class="txt"></div>

    <div class="nam"></div>
    <div class="name"></div>

    <div></div>
  </body>
</html>
